Auto merge of #3898 - jmatraszek:fix_rust_40955, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 5 Apr 2017 23:36:04 +0000 (23:36 +0000)
committerbors <bors@rust-lang.org>
Wed, 5 Apr 2017 23:36:04 +0000 (23:36 +0000)
Fix rust-lang/rust 40955

Proposed fix for rust-lang/rust#40955.

I could also work on adding some additional tests, so we have all cases covered and automatically tested.


Trivial merge